<!DOCTYPE html>
<html>
<head>
    <title>击剑动作分析系统</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container">
        <h1>击剑动作分析系统</h1>
        
        <div class="upload-section">
            <form id="uploadForm">
                <div class="input-group">
                    <label for="videoFile">选择视频文件：</label>
                    <input type="file" id="videoFile" name="video" accept="video/*" required>
                </div>
                
                <div class="input-group">
                    <label for="side">选择人物位置：</label>
                    <select id="side" name="side" required>
                        <option value="0">单人视频</option>
                        <option value="1">左边人物</option>
                        <option value="2">右边人物</option>
                    </select>
                </div>
                
                <div class="input-group">
                    <label for="height">输入身高 (cm)：</label>
                    <input type="number" id="height" name="height" required min="100" max="250">
                </div>
                
                <button type="submit">上传并分析</button>
            </form>
            
            <div class="progress-bar" style="display: none;">
                <div class="progress"></div>
                <div class="progress-text">0%</div>
            </div>
        </div>

        <div class="analysis-section" style="display: none;">
            <div class="video-container">
                <h2>视频预览</h2>
                <video id="videoPreview" controls></video>
            </div>
            
            <div class="results-container">
                <h2>分析结果</h2>
                <div class="summary">
                    <div class="stat-box">
                        <h3>总攻击次数</h3>
                        <div id="totalAttacks">0</div>
                    </div>
                    <div class="stat-box">
                        <h3>总移动距离</h3>
                        <div id="totalDistance">0 cm</div>
                    </div>
                </div>
                
                <div class="attacks-list">
                    <h3>详细攻击数据</h3>
                    <div id="attacksList"></div>
                </div>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>